package pojo;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author ： CodeWater
 * @create ：2022-04-05-16:05
 * @Function Description ：
 *
 * 1.实体类的类名应该与表格名称对应
 * 2.实体类的属性名应该与列名对应
 * 3.实体类的属性类型应私有
 * 4.实体类属性的getter和setter方法
 * 5.实体类必须具备无参构造器
 * 6.应该实现序列化接口（缓存 分布式项目数据传递 可能会将数据序列化）
 * 7.应该重写hashcode与equals方法
 * 8.toString方法是否重写都可以
 *
 * 使用lombook帮助我们生成getter和setter方法
 *  1.检查idea是否以及安装了lombook插件
 *  2.是否勾选了enable annotation processing
 *  3.导入lombook依赖(下载依赖包放入WEB-INF/lib 下)
 *  4.使用@Data注解
 */
public class SysSchedule implements Serializable {
    private Integer sid;
    private Integer uid;
    private String title;
    private  Integer completed;

    public SysSchedule() {
    }

    public SysSchedule(Integer sid, Integer uid, String title, Integer completed) {
        this.sid = sid;
        this.uid = uid;
        this.title = title;
        this.completed = completed;
    }

    public Integer getSid() {
        return sid;
    }

    public void setSid(Integer sid) {
        this.sid = sid;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getCompleted() {
        return completed;
    }

    public void setCompleted(Integer completed) {
        this.completed = completed;
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;
        SysSchedule that = (SysSchedule) o;
        return Objects.equals(sid, that.sid) && Objects.equals(uid, that.uid) && Objects.equals(title, that.title) && Objects.equals(completed, that.completed);
    }

    @Override
    public int hashCode() {
        return Objects.hash(sid, uid, title, completed);
    }

    @Override
    public String toString() {
        return "SysSchedule{" +
                "sid=" + sid +
                ", uid=" + uid +
                ", title='" + title + '\'' +
                ", completed=" + completed +
                '}';
    }
}
